/**
 * Copyright &copy; 2012-2016 < All rights reserved.
 */
package com.jeemicro.weixin.modules.cms.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeemicro.weixin.common.persistence.Page;
import com.jeemicro.weixin.common.service.CrudService;
import com.jeemicro.weixin.modules.cms.dao.BaomingDao;
import com.jeemicro.weixin.modules.cms.entity.Baoming;
import com.jeemicro.weixin.modules.cms.entity.CmsHuiyuan;
import com.jeemicro.weixin.modules.cms.entity.OaYuangong;

/**
 * 在线报名Service
 * @author zmrid
 * @version 2017-07-15
 */
@Service
@Transactional(readOnly = true)
public class BaomingService extends CrudService<BaomingDao, Baoming> {

	public Baoming get(String id) {
		return dao.get(id);
	}
	
	public Page<Baoming> findPage(Page<Baoming> page, Baoming baoming) {

		baoming.getSqlMap().put("dsf", dataScopeFilter(baoming.getCurrentUser(), "o", "u"));
		baoming.setPage(page);
		page.setList(dao.findList(baoming));
		return page;
	}
	
	@Transactional(readOnly = false)
	public void delete(Baoming baoming, Boolean isRe) {
		//dao.updateDelFlag(id, isRe!=null&&isRe?Guestbook.DEL_FLAG_AUDIT:Guestbook.DEL_FLAG_DELETE);
		dao.delete(baoming);
	}
	
	/**
	 * 更新索引
	 */
	public void createIndex(){
		//dao.createIndex();
	}
	
	/**
	 * 全文检索
	 */
	//FIXME 暂不提供
	public Page<Baoming> search(Page<Baoming> page, String q, String beginDate, String endDate){

		return page;
	}
	
}
